package com.mall.app.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;

import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 购物车表
 * </p>
 *
 * @author LeeSin
 * @since 2020-07-10
 */
@ApiModel(value="TbCart对象", description="购物车表")
public class TbCart extends Model<TbCart> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "购物id")
    @TableId(value = "cart_id", type = IdType.AUTO)
    private Integer cartId;

    @ApiModelProperty(value = "买家id")
    private Integer buyerId;

    @ApiModelProperty(value = "商品bean")
    private TbGoods goods;

    @ApiModelProperty(value = "该商品数量")
    private Integer quantity;
    public TbGoods getGoods()
	{
		return goods;
	}

	public void setGoods(TbGoods goods)
	{
		this.goods = goods;
	}

	@TableLogic
    private Integer deleted;


    public Integer getCartId() {
        return cartId;
    }

    public void setCartId(Integer cartId) {
        this.cartId = cartId;
    }

    public Integer getBuyerId() {
        return buyerId;
    }

    public void setBuyerId(Integer buyerId) {
        this.buyerId = buyerId;
    }

   

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.cartId;
    }

    @Override
    public String toString() {
        return "TbCart{" +
        "cartId=" + cartId +
        ", buyerId=" + buyerId +
        ", goodId=" + goods.toString() +
        ", quantity=" + quantity +
        ", deleted=" + deleted +
        "}";
    }
}
